import java.util.Scanner;

public class NGuessNumber {
    int[] generateAnswer(){
        int[] arr = new int[4];
        int[] temp = {0,1,2,3,4,5,6,7,8,9};
        for (int i = 0;i< arr.length;i++){
            int tempIndex = (int)(Math.random()*10);
            if (temp[tempIndex]==99){
                i--;
            }else {
                arr[i]= temp[tempIndex];
                temp[tempIndex]=99;
            }
        }

        return arr;
    }
    int[] getPlayerInput(){
        int[] arr = new int[7];
        Scanner sc = new Scanner(System.in);
        arr[0]=sc.nextInt();
        arr[1]=sc.nextInt();
        arr[2]=sc.nextInt();
        arr[3]=sc.nextInt();
        
        return arr;
    }
    int compareGuessAnswer(int[] randomGroup,int[] playerInput){
        int count=0;

        for (int i = 0; i < 7; i++) {
            if (randomGroup[i]==playerInput[i]){
                count++;
            }
        }

        return count;
    }

    boolean isWin(int count){
        return count == 7;
    }
}
